﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

namespace KWS.KPanel
{
    public partial class Index : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.IsAuthenticated)
                ltlUsername.Text = HttpContext.Current.User.Identity.Name;
            else
                FormsAuthentication.RedirectToLoginPage();

        }

        protected void lbLogout_Click(object sender, EventArgs e)
        {
            FormsAuthentication.SignOut(); FormsAuthentication.RedirectToLoginPage();
        }

        protected void btnLogout_Click(object sender, EventArgs e)
        {
            FormsAuthentication.SignOut(); FormsAuthentication.RedirectToLoginPage();
        }
    }
}